package com.esun.payment_api.mapper;

import com.esun.payment_api.bean.InvCancelDetailBean;
import com.esun.payment_api.dao.InvCancelFormDao;
import com.esun.payment_api.domain.InvCancelForm;
import com.esun.payment_api.domain.InvCancelFormExample;
import java.util.List;

import com.esun.payment_api.dto.InvCancelFormQueryParam;
import org.apache.ibatis.annotations.Param;

public interface InvCancelFormMapper {
    long countByExample(InvCancelFormExample example);

    int deleteByExample(InvCancelFormExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(InvCancelForm record);

    int insertSelective(InvCancelForm record);

    List<InvCancelForm> selectByExample(InvCancelFormExample example);

    InvCancelForm selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") InvCancelForm record, @Param("example") InvCancelFormExample example);

    int updateByExample(@Param("record") InvCancelForm record, @Param("example") InvCancelFormExample example);

    int updateByPrimaryKeySelective(InvCancelForm record);

    int updateByPrimaryKey(InvCancelForm record);

    //获取发票作废详情
    InvCancelDetailBean getInvCancelDetail(@Param("userId") Short userId, @Param("id") Integer id);

    //软删除
    int deleteById(Integer id);

    //发票作废提交审批--提交按钮
    void invCancelSubmitApproval(Short coId, String uuid, Integer invId, Short userId, Short deptId, String flowTypeName);

    //发票作废被拒后重新提交审批--再次提交按钮
    void invCancelResubmitApproval(Short coId, String uuid, Integer invId, Short userId, Short deptId, String flowTypeName);

    //校验发票作废提交申请
    String checkInvCancelSubmit(@Param("id") Integer id);

    //通过发票作废id，获取对应发票的业务类型
    String getBusinessTypeByInvCancelId(Short coId, Integer invCancelId);

    //发票作废-分类列表
    List<InvCancelFormDao> getListByType(@Param("queryParam") InvCancelFormQueryParam queryParam);
}